import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {

  },
  getters: {
  },
  mutations: {
    saveUser(state, payload) {
      // 将用户名存入storage
      sessionStorage.setItem('name', payload);
    },
    saveshopId(state, payload) {
      sessionStorage.setItem('shopId', payload);
    },
    outLogin() {
      sessionStorage.removeItem('name');
      sessionStorage.removeItem('shopId');
    },
  },
  actions: {
  },
  modules: {
  }
})
